#ifndef DSPSIMULATOR_MEMORY_MEMORYVISIT_H
#define DSPSIMULATOR_MEMORY_MEMORYVISIT_H

#include "simulator/type/type.h"
#include "dspSimulator/targetMachine/dspMachine.h"

namespace dspsimulator::memory_visit {
    static std::shared_ptr<simulator::Memory> memory;

    static u32 read_i8(u32 address) {
        return memory->read<u8>(address);
    }

    static u32 read_i16(u32 address) {
        return memory->read<u16>(address);
    }

    static u32 read_i32(u32 address) {
        return memory->read<u32>(address);
    }

    static void write_i8(u32 address, u8 data) {
        memory->write(address, data);
    }

    static void write_i16(u32 address, u16 data) {
        memory->write(address, data);
    }

    static void write_i32(u32 address, u32 data) {
        memory->write(address, data);
    }
}

#endif //DSPSIMULATOR_MEMORY_MEMORYVISIT_H
